<?php
/*
Template Name: Sitemap Template
*/
get_header();
require(WEBTREATS_INCLUDES . "/var.php");
?>

<div id="body_block" <?php webtreats_body_class(); ?>>
	
	<?php if($home_slider_page) { webtreats_header_slider_switcher($homepage_slider); } ?>
	
	<?php webtreats_teaser_text($post->ID); ?>

<div id="body_block_background">
	<div class="inner">
		<?php $breadcrumb_page_disable = get_post_meta($post->ID, 'breadcrumb_page_disable', true);
				if (!$breadcrumb_disable && !$breadcrumb_page_disable){ if (class_exists('simple_breadcrumb')) { $bc = new simple_breadcrumb; }} ?>
		<div id="main">
			<div class="content">
		
			<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
				<div <?php post_class() ?> id="post-<?php the_ID(); ?>">	

					<?php 
					$teaser_text = get_post_meta($post->ID, 'teaser_text', true); 
					if ($teaser_text == 'default' && $header_teaser == 'disable' || $teaser_text == 'disable') { ?>
					<h1><?php the_title(); ?></h1>
					<?php } ?>

					<div class="entry">
						<?php the_content(); ?>
						<?php require(WEBTREATS_INCLUDES . "/sitemap-content.php"); ?>
						<div class="clearboth"></div>
					</div>

				<?php wp_link_pages('before=<div id="page-links">Pages: &after=</div>'); ?>

			</div> <!-- .post -->

<?php endwhile; endif; ?>
	
<?php get_sidebar(); ?>
<?php get_footer(); ?>